home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / freeware / pixeltoolbox / Setup.exe / Main / PixelToolbox.exe / PixelToolbox.dxr / Scripts_11_zoom current.ls < prev    next >
Encoding:
Text File  |  2002-06-08  |  1.3 KB  |  53 lines

  1. property pMySprite, pMySpriteWidth, pMySpriteHeight
  2. global gSize
  3.  
  4. on beginSprite me
  5.   pMySprite = sprite(me.spriteNum)
  6.   if (gSize = "8") or (gSize = "16") or (gSize = "32") then
  7.     pMySpriteWidth = pMySprite.width
  8.     pMySpriteHeight = pMySprite.height
  9.   end if
  10. end
  11.  
  12. on mouseWithin me
  13.   if (gSize = "8") or (gSize = "16") or (gSize = "32") then
  14.     if sprite(pMySprite).width = pMySpriteWidth then
  15.       cursor(302)
  16.       put "Current image. Click to zoom in." into field "status"
  17.     else
  18.       cursor(303)
  19.       put "Current image. Click to zoom out." into field "status"
  20.     end if
  21.   else
  22.     put "Current image." into field "status"
  23.   end if
  24. end
  25.  
  26. on mouseLeave me
  27.   if (gSize = "8") or (gSize = "16") or (gSize = "32") then
  28.     cursor(0)
  29.   end if
  30.   put EMPTY into field "status"
  31. end
  32.  
  33. on mouseDown me
  34.   if (gSize = "8") or (gSize = "16") or (gSize = "32") then
  35.     repeat while the mouseDown
  36.       cursor(304)
  37.       updateStage()
  38.     end repeat
  39.   end if
  40. end
  41.  
  42. on mouseUp me
  43.   if (gSize = "8") or (gSize = "16") or (gSize = "32") then
  44.     if sprite(pMySprite).width = pMySpriteWidth then
  45.       sprite(pMySprite).width = 64
  46.       sprite(pMySprite).height = 64
  47.     else
  48.       sprite(pMySprite).width = pMySpriteWidth
  49.       sprite(pMySprite).height = pMySpriteHeight
  50.     end if
  51.   end if
  52. end
  53.